const index = () => import("pages/index"); //首页
const category = () => import("pages/category/category"); //分类
// const discovery = () => import('pages/discovery/discovery') //发现
const cart = () => import("pages/cart/cart"); //购物车
const my = () => import("pages/my/my"); //个人中心

export default [
  {
    path: "/",
    name: "index",
    redirect: "/index",
  },
  {
    path: "/index",
    component: index,
    name: "index",
    meta: {
      title: "商城首页",
      showBottomTabBar: true, //底部栏是否显示
      keepAlive: true, //添加该字段，表示需要缓存
      type: "index"
    },
  },
  {
    path: "/category",
	name: 'category',
    component: category,
    meta: {
      title: "分类",
      showBottomTabBar: true,
      keepAlive: true, //添加该字段，表示需要缓存
      type: "category",
    },
  },
  {
    path: "/cart",
	name: 'cart',
    component: cart,
    meta: {
      showBottomTabBar: true,
      title: "购物车",
      requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
      keepAlive: true, //添加该字段，表示需要缓存
    },
  },
  {
    path: "/my",
    component: my,
    name: 'my',
    meta: {
      title: "个人中心",
      requireAuth: true, // 添加该字段，表示进入这个路由是需要登录的
      keepAlive: true, //添加该字段，表示需要缓存
      showBottomTabBar: true,
    },
  },
];
